home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DJGPP / CBGRX103.ZIP / contrib / libgrx / src / lowmode.s < prev    next >
Text File  |  1993-12-06  |  1KB  |  74 lines

  1. /* This is file LOWMODE.S */
  2. /*
  3. ** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
  4. **
  5. ** This file is distributed under the terms listed in the document
  6. ** "copying.dj", available from DJ Delorie at the address above.
  7. ** A copy of "copying.dj" should accompany this file; if not, a copy
  8. ** should be available from where this file was obtained.  This file
  9. ** may not be distributed without a verbatim copy of "copying.dj".
  10. **
  11. ** This file is distributed WITHOUT ANY WARRANTY; without even the implied
  12. ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. */
  14.  
  15.     .data
  16.     .globl  __GrScreenX
  17.     .globl  __GrScreenY
  18.  
  19.     .text
  20.     .globl  __GrLowSetMode
  21. __GrLowSetMode:
  22.     pushl    %ebp
  23.     movl    %esp,%ebp
  24.     pushl    %ebx
  25.     pushl    %esi
  26.     pushl    %edi
  27.  
  28.     movl    8(%ebp),%eax
  29.     movb    $0xff,%ah
  30.     movl    12(%ebp),%ecx            /* width  */
  31.     movl    16(%ebp),%edx            /* height */
  32.     movl    20(%ebp),%ebx            /* colors */
  33.  
  34.     int    $0x10
  35.  
  36.     movl    %ecx,__GrScreenX
  37.     movl    %edx,__GrScreenY
  38.     movl    %ebx,%eax
  39.  
  40.     popl    %edi
  41.     popl    %esi
  42.     popl    %ebx
  43.     leave
  44.     ret
  45.  
  46.     .align  2,0x90
  47.     .globl  _GrGetDriverModes
  48. _GrGetDriverModes:
  49.     .globl  __GrGetDriverModes
  50. __GrGetDriverModes:
  51.     pushl    %ebp
  52.     movl    %esp,%ebp
  53.     pushl    %ebx
  54.     pushl    %esi
  55.     pushl    %edi
  56.  
  57.     movb    $0xfe,%ah
  58.     xorl    %ecx,%ecx
  59.     xorl    %edx,%edx
  60.     int    $0x10
  61.     movl    8(%ebp),%eax
  62.     movl    %ecx,(%eax)
  63.     movl    12(%ebp),%eax
  64.     movl    %edx,(%eax)
  65.     movl    %ebx,%eax
  66.  
  67.     popl    %edi
  68.     popl    %esi
  69.     popl    %ebx
  70.     leave
  71.     ret
  72.  
  73.  
  74.